<template>
	<div class="searchbar">
		<el-input placeholder="全站搜素" v-model="searchKey"></el-input>
		<el-button type="primary" v-on:click="skipUrl()">搜索</el-button>
	</div>
</template>


<script>
	export default {
	  data() {
	    return {
	    	searchKey: ""
	    }
	  },
	  methods: {
	    skipUrl(){
	    	var url ="/search/"+this.searchKey;
	    	this.$router.push({ path: url})
	    }
	  }
	}

</script>

<style type="text/css">
	.searchbar{background: #fff;margin-top: 9px;padding: 10px;}
	.searchbar .el-input{width: 75%;}
	.searchbar button{width: 20%;}
</style>